<template>
	<view
	class="flex-center bg-white"
	style="padding: 24rpx 30rpx 22rpx 30rpx;">
		<view class="img-container clear-flex">
			<x-image :src="showImage(item.imgUrl, 'logo')"/>
		</view>
		
		<view
		class="flex-between flex-column"
		style="padding: 4rpx 0 4rpx 20rpx; height: 172rpx; width: 100%;"
		>
			<view class="u-f-28 u-lh-40 font-medio linecamp-2">{{ item.title || '' }}</view>
			
			<view class="u-p-t-4 u-f-26 u-lh-36 flex-between flex-column" style="width: 100%;">
				<view class="flex-center-between">
					<view class="color-grew">{{ item.specs || '' }}</view>
					<view class="font-bold">x{{ item.amount || 0 }}</view>
				</view>
				
				<view class="flex-center-between u-m-t-14">
					<view></view>
					<!-- <view>秒杀订单</view> -->
					<view
					class="font-bold"
					style="color: #FC2642;"
					>{{ showText }}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			item: {
				default: () => ({})
			},
			score: {
				default: false
			}
		},
		computed: {
			showText() {
				let { discountPrice, finalIntegral } = this.item || {}
				if (this.score) {
					return (finalIntegral || 0) + this.lang_common.score
				}
				return this.lang_unit.money + (discountPrice || 0).toFixed(2)
			}
		}
		
	}
</script>

<style scoped lang="scss">
	.img-container {
		width: 172rpx;
		height: 172rpx;
		border-radius: 10rpx;
		overflow: hidden;
		background-color: #f9f9f9;
	}
</style>
